<div class="content">
	<?=$text['text1']?>
	<? if(!$events): ?>
	<p><? echo $error; ?></p>
	<? else: ?>
	<? foreach($events as $event): ?>
	<br clear="all" />
	<h3 style="color:#de4b32;"><b><?=Html::chars($event['name'])?></b></h3>
	<table class="items" width="100%">
		<tr>
			<? if(isset($attachments[$event['id']])): ?>
				<td class="padding10">
			<? else: ?>
				<td class="padding10" colspan="2">
			<? endif; ?>
				<b><?=Html::chars($event['note1'])?></b>
				<br />
				<p style="text-align: justify;"><?=$event['text1']; ?></p>
			</td>
			<? if(isset($attachments[$event['id']])): ?>
			<td width="40%" class="padding10">
				<? foreach($attachments[$event['id']] as $attachment): ?>
				<img width="16" height="16" alt="Download PDF" class="middle" src="/images/icons/pdf.png">
				<a href="<?=$attachmentPath.$attachment['section'].'/'.substr($attachment['alias'], 0, 1).'/'.$attachment['alias'].'/'.$attachment['filename']?>" target="_blank">
					Download <?=$attachment['filename']?>
				</a>
				<br />
				<? endforeach; ?>
			</td>
			<? endif; ?>
		</tr>
		<tr>
			<td width="100%" colspan="2" align="center">
				<?$cnt = 0;?>
				<? if(isset($images[$event['id']])): ?>
				<div id="triggers">
					<table>
						<tr>
							<?foreach ($images[$event['id']] as $image):?>
							<td style="width: 33%;" class="padding10">
								<a href="/content/directory/images/events/fullsize/<?=strtolower(substr($image['alias'], 0, 1)) . '/' . $image['alias']?>.jpg" title="<?=Html::chars($image['name'])?>">
									<img src="/content/directory/images/events/thumbs/<?=strtolower(substr($image['alias'], 0, 1)) . '/' . $image['alias']?>.jpg" alt="" class="image" />
								</a>
								<br /><br />
							</td>
								<? $cnt++ ?>
								<?if (($cnt % 3 == 0)): ?>
						</tr><tr>
								<?endif?>
							<?endforeach;?>
						</tr>
					</table>
				</div>
				<? endif; ?>
			</td>
		</tr>
	</table>
	<br clear="all" />
	<? endforeach; ?>
	<? endif; ?>
</div>
<p class="right">
	<a href="http://www.rep3.com"><img src="/images/rep3.png" width="205" height="52" alt="" /></a>
</p>
<p style="color:#d09022; font-size:14px; float:right; padding-right:20px;">
		<a href="#top" id="bottomLink">Top</a>
	</p>
<div class="overlay" id="gallery">
	<a class="prev">prev</a>
	<a class="next">next</a>
	<div class="info"></div>
	<img class="progress" src="/images/jquerytools/overlay/loading.gif" />
</div>